#ifndef SPRITE_H_
#define SPRITE_H_

// By: Jesse Guarascia de Urena
// Base sprite class
// Deals with rendering images

#include "Rect.h"
#include "Texture2D.h"
#include "Render.h"
#include "AssetManager.h"

class Sprite : AssetManager
{
private:
	Rect pos; // Position rectangle for the sprite
	Texture2D texture; // Texture used
	int imageID; // Image ID used by the sprite

	float rotation; // Rotation of the sprite

public:
	Sprite(void);
	~Sprite(void);

	// Load an image to use for the sprite
	void LoadImg(std::string file);
	void SetImg(int _imageID);

	// Render the sprite
	void Render();
	void Render(Rect rect, float rot = 0.0f);

	// Get the rectangle used by the sprite
	inline Rect &Pos() { return pos; }

	// Get the texture of the sprite
	inline Texture2D &Texture() { return texture; }

	// Get/Set the rotation proprety
	inline void SetRotation(float rot) { rotation = rot; }
	inline float Rotation() { return rotation; }

	// Get the imageID of the sprite
	inline int ImageID() { return imageID; }
};

#endif // SPRITE_H_

